package rpc.utils;

import java.util.Arrays;
import java.util.stream.Collectors;

/*********
 *
 *
 *@author 197
 *@date 2020/8/20 21:07
 *
 **/


public final class ExceptionUtils {

  public static String getTrace(Exception e) {
    return Arrays.stream(e.getStackTrace()).map(c -> c.getClassName() + "|" + c.getMethodName() + "|" + c.getLineNumber()).limit(30).collect(
        Collectors.joining(","));

  }
}
